import { request } from "@/utils/request";

// 机构列表
export function orgTree(data) {
  return request({
    url: "/org/tree",
    method: "get",
    params:data,
  });
}

//新增医疗机构
export function orgMedical(data) {
    return request({
      url: "/org/medical",
      method: "post",
      data,
    });
  }

//根据ID查医疗机构
  export function orgMedicalDetail(id) {
    return request({
      url: "/org/medical?id="+id,
      method: "get",
    });
  }

  // 编辑医疗机构
  export function orgOfficial(data) {
    return request({
      url: "/org/medical",
      method: "put",
      data,
    });
  }



//删除
  export function orgDel(data) {
    return request({
      url: `/org`,
      method: "DELETE",
      params:data,
    });
  }


//根据ID查行政机构
export function orgOfficialDetail(id) {
  return request({
    url: "/org/official?id="+id,
    method: "get",
  });
}
  //新增机构
export function orgOfficialAdd(data) {
  return request({
    url: "/org/official",
    method: "post",
    data,
  });
}
//修改机构
  export function orgOfficialUpdata(data) {
    return request({
      url: "/org/official",
      method: "put",
      data,
    });
  }
